<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace OSS\Core;

class OssException extends \Exception
{
    private $details = [];
    public function __construct($details)
    {
        if(is_array($details)) {
            $message = $details["code"] . ": " . $details["message"] . " RequestId: " . $details["request-id"];
            parent::__construct($message);
            $this->details = $details;
        } else {
            $message = $details;
            parent::__construct($message);
        }
    }
    public function getHTTPStatus()
    {
        return isset($this->details["status"]) ? $this->details["status"] : "";
    }
    public function getRequestId()
    {
        return isset($this->details["request-id"]) ? $this->details["request-id"] : "";
    }
    public function getErrorCode()
    {
        return isset($this->details["code"]) ? $this->details["code"] : "";
    }
    public function getErrorMessage()
    {
        return isset($this->details["message"]) ? $this->details["message"] : "";
    }
    public function getDetails()
    {
        return isset($this->details["body"]) ? $this->details["body"] : "";
    }
}

?>